D = {
	'name':'kahty',
	'age': 25,
	'birthday':'1989-2-4',
	1:'aaa',
	2:'bbb',
	3:'ccc'
}

print D.get('name')#kahty
print D.get(2)#bbb
print D.get(33)#None

print D['age']#25
print D[1]#aaa
#print D[11] 
#Traceback (most recent call last):
#   File "dic.py", line 16, in <module>
#     print D[11]
# KeyError: 11

print D.has_key('age') #True
print D.has_key('Birthtday') #False

print D.keys()
print D.values()
print D.items()
#[1, 2, 3, 'name', 'age', 'birthday']
#['aaa', 'bbb', 'ccc', 'kahty', 25, '1989-2-4']
#[(1, 'aaa'), (2, 'bbb'), (3, 'ccc'), ('name', 'kahty'), ('age', 25), ('birthday', '1989-2-4')]

D2 = {
	'name':'cgg',
	'age': 24,
	1:'aaa',
	2:'bbb',
	3:'zzz'
}

D.update(D2)
print D
#{1: 'aaa', 2: 'bbb', 3: 'zzz', 'name': 'cgg', 'age': 24, 'birthday': '1989-2-4'}

print D.popitem()
print D

print D.popitem()
print D
# (1, 'aaa')
# {2: 'bbb', 3: 'zzz', 'name': 'cgg', 'age': 24, 'birthday': '1989-2-4'}
# (2, 'bbb')
# {3: 'zzz', 'name': 'cgg', 'age': 24, 'birthday': '1989-2-4'}

Dcopy = D.copy()
D.clear()
print D
print Dcopy
# {}
# {'age': 24, 3: 'zzz', 'name': 'cgg', 'birthday': '1989-2-4'}
